package thread;

public class FunctionAndProperty {
    public static void main(String[] args) {
        Thread thread = new Thread(()-> {
            while(true) {
                System.out.println("hello thread");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        });

        thread.start();

        //获取一下这些属性
        System.out.println("线程ID:"+thread.getId());
        System.out.println("线程名字:"+thread.getName());
        System.out.println("线程优先级:"+thread.getPriority());
    }
}
